package com.sphd.beautysalon.presenter;


import com.android.volley.VolleyError;
import com.sphd.beautysalon.model.AddCzInfoModelImpl;
import com.sphd.beautysalon.view.AddCzInfoView;

/**
* Created by Hu on 2016/12/20
*/

public class AddCzInfoPresenterImpl implements AddCzInfoPresenter {
    AddCzInfoModelImpl addCzInfoModel;
    AddCzInfoView addCzInfoView;

    public AddCzInfoPresenterImpl(AddCzInfoView addCzInfoView) {
        this.addCzInfoView = addCzInfoView;
        addCzInfoModel=new AddCzInfoModelImpl();
    }

    @Override
    public void addData(String url) {
        addCzInfoView.showLoading();
        addCzInfoModel.sendUrl(url,this);
    }

    @Override
    public void sendError(VolleyError error) {
        addCzInfoView.dissLoading();
    }

    @Override
    public void recRes(int res) {
        addCzInfoView.recRes(res);
        addCzInfoView.dissLoading();
    }
}